<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link th:href="@{/css/style.css}" rel="stylesheet" type="text/css" />
<script type="text/javascript" th:src="@{/js/jquery.js}"></script>

<body>
<div class="place"> <span>位置：</span>
  <ul class="placeul">
    <li>采购管理</li>
    <li>采购单审核</li>
    <li>基本内容</li>
  </ul>
</div>
<div class="rightinfo">
  <form action="/erp1/purchase/purchaseExamine/dlist" method="post" id="purchaseM">
    <input type="hidden" name="pageno" value="1" id="pageno"/>
    <ul class="tools">
      <li> 采购单编号:
        <input type="text" name="purchaseId"  th:value="${pur.purchaseId}"/>
      </li>
      <li> 采购时间:
        <input type="date" name="mintime" th:value="${minTime}"/>-
        <input type="date" name="maxtime" th:value="${maxTime}"/>
      </li>
      <li> 金额:
        <input type="text" class="stinput" name="mintotal" th:value="${mintotal}"/>-
        <input type="text" class="stinput" name="maxtotal" th:value="${maxtotal}" />
      </li>
      <li class="subBut" onclick="goPage(1)">
      <img th:src="@{/images/t06.png}" />查询
      </li>
    </ul>
    <table class="tablelist">
      <thead>
        <tr>
          <th >序号</th>
          <th >采购单编号</th>
          <th >采购时间</th>
          <th>金额</th>
          <th >操作人</th>
          <th >审核状态</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
        <tr th:each="c,var:${cpb.list}">
          <td th:text="${(cpb.pageNum-1)*cpb.pageSize+var.count}">1</td>
          <td th:text="${c.purchaseId}">DJ201701270001</td>
          <td th:text="${#dates.format(c.purchaseTime,'yyyy-MM-dd HH:mm:ss')}">2017-01-25 15:05:05</td>
          <td th:text="${c.totalMoney}">￥9,876,582</td>
          <td th:text="${session.currUser.uname}">关羽</td>
          <td>审核中</td>
          <td>
            <a th:href="@{'/purchase/purchaseExamine/dateils/'+${c.purchaseId}}" class="tablelink">审核</a>
          </td>
        </tr>
      </tbody>
    </table>
    <div class="pagin">
      <div class="message">共<i class="blue" th:text="${cpb.total}">1256</i>条记录，当前显示第&nbsp;<i class="blue" th:text="${cpb.pageNum}">2&nbsp;</i>页</div>
      <ul class="paginList">
        <li class="paginItem">
          <a href="javascript:;" th:onclick="goPage([[${cpb.isFirstPage?1:cpb.pageNum-1}]])">
            <span th:class="${cpb.isFirstPage?'pagepre':'pagenxt roate'}" ></span>
          </a>
        </li>
        <li th:class="${page==cpb.pageNum?'paginItem current':'paginItem'}"
            th:each="page:${cpb.navigatepageNums}">
          <a href="javascript:;" th:text="${page}" th:onclick="goPage([[${page}]])">2</a>
        </li>

        <li class="paginItem">
          <a href="javascript:;" th:onclick="goPage([[${cpb.isLastPage?cpb.pages:cpb.pageNum+1}]])">
            <span th:class="${cpb.isLastPage?'pagepre roate':'pagenxt'}"></span>
          </a>
        </li>
      </ul>
    </div>
  </form>
</div>
<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');

    function goPage(num) {
      //alert(num);
      $("#pageno").val(num);
      $("#purchaseM").submit();
    }

</script>
</body>
</html>
